package com.chuanjiabao.wisdom.util.dialog;

import android.content.Context;
import android.databinding.DataBindingUtil;
import android.view.LayoutInflater;
import android.view.View;

import com.chuanjiabao.wisdom.R;
import com.chuanjiabao.wisdom.databinding.DialogInCommonBinding;
import com.chuanjiabao.wisdom.databinding.DialogUserProtocolBinding;
import com.chuanjiabao.wisdom.listener.OnBHClickListener;

/**
 * Created by 86178 on 2019/7/13.
 * author mogen
 * 用心，成就一切。
 *
 * 用户协议
 */

public class UserProtocolDialog extends BaseDialog {

    Context context;
    DialogUserProtocolBinding inComminBinding ;
    OnBHClickListener onBHClickListener;

    public UserProtocolDialog(Context context) {
        super(context);
        this.context = context;
        inComminBinding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_user_protocol,null,false);
        inComminBinding.setDialog(this);
        setContentView(inComminBinding.getRoot());
    }

    public void setOnBHClickListener(OnBHClickListener onBHClickListener) {
        this.onBHClickListener = onBHClickListener;
    }

    public void noPoint(View view){
        if (onBHClickListener != null) {
            onBHClickListener.onCloseClick();
        }
        dismiss();
    }

    public void okPoint(View view){
        if (onBHClickListener != null) {
            onBHClickListener.onConfirmClick();
        }
        dismiss();
    }

}


